﻿@model SchoolCommunicationSystem.Models.AssignSubjectAndTeacher

@{
    ViewBag.Title = "Phân bổ môn học";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
<div id="page-heading">
    <h1>Quản lý lớp học</h1>
</div>
<div class="container">
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h4>Phân bổ môn học</h4>
                </div>
                <div class="panel-body">
                    <div class="module_contentwithsearch">


                        @using (Html.BeginForm("AssignSubject", "Class", FormMethod.Post, new { @class = "form-horizontal" }))
                        { <div class="form-group" style="margin-bottom: 0px; padding-left: 15px;">
                            @Html.Label("Lớp", new { @class = "col-sm-1", @style = "width: 5%;" })
                            <div class="col-sm-1">
                                @Html.DropDownListFor(m => m._classID, Model.ClassSelectList, new { @class = "form-control", @style = "height:26px;padding: 2px 5px 2px 2px;" })
                            </div>

                            <div class="col-sm-2" style="width: 12%;">
                                <button class="btn-primary btn searchbtn btn-sm" type="submit" style="padding: 4px 15px;">Chọn</button>
                            </div>
                        </div>
                        }
                    </div>
                    <div class="module_contentresult">
                        <br />
                        @using (Html.BeginForm("AssignSubjected", "Class", FormMethod.Post, new { @class = "form-horizontal" }))
                        {
                            @Html.HiddenFor(m => m.ClassIDToUpdate)
                            <div class="form-group">
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID1, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID1, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID2, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID2, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID3, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID3, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID4, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID4, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID5, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID5, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID6, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID6, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                            </div>
                          
                            <div class="form-group">
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID7, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID7, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID8, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID8, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                            </div>
                           
                            <div class="form-group">
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID9, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID9, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID10, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID10, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                            </div>
                           
                            <div class="form-group">
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID11, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID11, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID12, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID12, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID13, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID13, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Môn học", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.subjectID14, Model.SubjectSelectList, "", new { @class = "form-control" })
                                </div>
                                @Html.Label("Giáo viên", new { @class = "col-sm-1 control-label" })
                                <div class="col-sm-2">
                                    @Html.DropDownListFor(m => m.teacherID14, Model.TeacherSelectList, "", new { @class = "form-control" })
                                </div>
                            </div>
                            <div style="color: Green; font-weight: bold">
                                @TempData["msg"]
                            </div>
                            <div style="color: Red; font-weight: bold">
                                @TempData["MsgError"]
                            </div>
                            <br />
                            <div class="row">
                                <div class="col-sm-2 col-sm-offset-0">
                                    <div class="btn-toolbar">
                                        <button class="btn-primary btn" type="submit">Phân bổ</button>
                                    </div>
                                </div>
                            </div>
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
